import request from './request'

export const getArticleList = (obj) => {
  return request({
    url: '/article/manager/list',
    method: 'post',
    data: obj
  })
}

// 修改文章状态
export const editArticleList = (obj) => {
  return request({
    url: '/article/update/status',
    method: 'post',
    data: obj
  })
}

// 修改文章
export const updateData = (obj) => {
  return request({
    url: '/article/update',
    method: 'post',
    data: obj
  })
}

// 新增文章
export const addData = (obj) => {
  return request({
    url: '/article/add',
    method: 'post',
    data: obj
  })
}

export const aticleStatus = (obj) => {
  return request({
    url: '/article/manager/list',
    method: 'post',
    data: obj
  })
}

// 文章详情
export const detailArticle = (obj) => {
  return request({
    url: '/article/manager/detail',
    method: 'post',
    data: obj
  })
}

// 获取文章分类
export const aticleSort = () => {
  return request({
    url: '/article/category/list',
    method: 'post'
  })
}

// 修改
export const editSort = (obj) => {
  return request({
    url: '/article/category/update',
    method: 'post',
    data: obj
  })
}
// 新增文章分类
export const addSort = (obj) => {
  return request({
    url: '/article/category/add',
    method: 'post',
    data: obj
  })
}

// 图片上传
export const upLoad = () => {
  return request({
    url: '/upload/picture',
    method: 'post',
    data: {
      name: 'picture'
    }
  })
}

// 删除文章分类
export const removeSort = (obj) => {
  return request({
    url: '/article/category/remove',
    method: 'post',
    data: obj
  })
}
